import dayjs from 'dayjs'
import utc from 'dayjs/plugin/utc'

dayjs.extend(utc)

const DATE_TIME_FORMAT = 'YYYY-MM-DD HH:mm:ss' // 默认格式

export function formatUtcString(utcString: string, format?: string) {
  return dayjs.utc(utcString).format(format ?? DATE_TIME_FORMAT)
}
